package com.xinqi.modules.exam.analyze.manager;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.exam.analyze.domain.CourseExamPaperAnalyzeEntity;
import com.xinqi.modules.exam.analyze.dto.req.CourseExamAnalyzeStudentScoreQuestDTO;
import com.xinqi.modules.exam.analyze.dto.req.CourseExamPaperAnalyzeQueryDTO;
import com.xinqi.modules.exam.analyze.dto.rsp.CourseExamAnalyzeStudentScoreDTO;
import com.xinqi.modules.exam.analyze.dto.rsp.CourseExamPaperAnalyzeResultDTO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 课程测评分析管理层
 *
 * @author: linkai
 * @date: 2023/07/02
 */
public interface CourseExamPaperAnalyzeManager extends BaseService<CourseExamPaperAnalyzeEntity> {

    /**
     * 自定义分页查询
     */
    Page<CourseExamPaperAnalyzeResultDTO> findPage(Page<Object> page, CourseExamPaperAnalyzeQueryDTO query);

    /**
     * 自定义列表查询
     */
    List<CourseExamPaperAnalyzeResultDTO> findList(CourseExamPaperAnalyzeQueryDTO query);

    /**
     * 根据id查询 课程测评分析数据
     */
    CourseExamPaperAnalyzeEntity findById(Long id);

    /**
     * 根据id删除 课程测评分析数据
     */
    @Transactional(rollbackFor = Exception.class)
    boolean deleteById(Long id);

    CourseExamPaperAnalyzeEntity findByExamId(Long examId);

    IPage<CourseExamAnalyzeStudentScoreDTO> findStudentScore(Page<Object> page, CourseExamAnalyzeStudentScoreQuestDTO questDTO);
}
